﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Web.Mvc;

namespace MMSWebsite.Models.Asset
{
    public class Asset
    {
        [HiddenInput]
        public int Id { get; set; }

        public Customer Customer { get; set; }

        [Display(Name = "Asset Name")]
        public string AssetName { get; set; }

        [Display(Name = "Information")]
        public string Information { get; set; }

        [Display(Name = "Asset Type")]
        public MasterData AssetType { get; set; }

        public List<AssetStatus> Status { get; set; }

        public Valuation Valuation { get; set; }

        public Rate Rate { get; set; }

        public Loan Loan { get; set; }

        public string Freeze { get; set; }
    }

    public class AssetStatus
    {
        [HiddenInput]
        public int Id { get; set; }

        public MasterData Status { get; set; }

        public DateTime? StatusDate { get; set; }

    }

    public class Rate
    {
        [HiddenInput]
        public int Id { get; set; }

        [Display(Name = "% Rate")]
        [DisplayFormat(DataFormatString = "{0:F2} %")]
        public decimal? ValueRate { get; set; }

        [Display(Name = "Rate Date")]
        public DateTime? RateDate { get; set; }
    }

    public class Loan
    {
        [HiddenInput]
        public int Id { get; set; }

        [Display(Name = "Value for Loan")]
        [DataType(DataType.Currency)]
        public decimal? ValueLoan { get; set; }

        [Display(Name = "Loaned By")]
        public EmployeeViewModel LoanBy { get; set; }

        [Display(Name = "Loan Date")]
        public DateTime? LoanDate { get; set; }

    }

    public class Valuation
    {
        [HiddenInput]
        public int Id { get; set; }

        [Display(Name = "Value for Valuation")]
        [DataType(DataType.Currency)]
        public decimal? Value { get; set; }

        [Display(Name = "Valuated By")]
        public EmployeeViewModel ValuationBy { get; set; }

        [Display(Name = "Valuation Date")]
        public DateTime? ValuationDate { get; set; }

    }
}